package org.example.consumer;

import org.apache.dubbo.config.annotation.DubboReference;
import org.example.dubbo.api.DemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @DubboReference
    private DemoService demoService;

    @GetMapping("/hello")
    public String sayHello(@RequestParam String name) {
        return demoService.sayHello(name);
    }
}